﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:src="clr-namespace:NielsHebling.UnitTestResultViewerForSL.Controls">
    
    <!--Extended ListView SortArrows-->
    <DataTemplate x:Key="HeaderTemplateArrowUp">
        <DockPanel>
            <TextBlock HorizontalAlignment="Center" Text="{Binding}"/>
            <Path x:Name="arrow" StrokeThickness = "1" Fill = "Gray" Data = "M 5,10 L 15,10 L 10,5 L 5,10"/>
        </DockPanel>
    </DataTemplate>

    <DataTemplate x:Key="HeaderTemplateArrowDown">
        <DockPanel>
            <TextBlock HorizontalAlignment="Center" Text="{Binding}"/>
            <Path x:Name="arrow" StrokeThickness = "1" Fill = "Gray" Data = "M 5,5 L 10,10 L 15,5 L 5,5"/>
        </DockPanel>
    </DataTemplate>

    <DataTemplate x:Key="HeaderTemplateUnsorted">
        <DockPanel>
            <TextBlock HorizontalAlignment="Center" Text="{Binding}"/>
            <Path x:Name="arrow" StrokeThickness = "1" Fill = "Transparent" Data = "M 5,5 L 10,10 L 15,5 L 5,5"/>
        </DockPanel>
    </DataTemplate>

    <ControlTemplate x:Key="ArrowDown">
        <DockPanel>
            <Path x:Name="arrow" StrokeThickness = "1" Fill = "Gray" Data = "M 5,5 L 10,10 L 15,5 L 5,5"/>
        </DockPanel>
    </ControlTemplate>

    <!--ListViewStyle-->
    <Style TargetType="{x:Type ListViewItem}" x:Key="ListViewItemStyleBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                        <StackPanel>
                            <GridViewRowPresenter Name="row"/>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Alternating Row Styles-->
    <Style TargetType="{x:Type ListViewItem}" 
               BasedOn="{StaticResource ListViewItemStyleBase}" 
               x:Key="ListViewItemStyle1">
        <Setter Property="Background" Value="White"/>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="Background" Value="#FFFFC120"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="#FFE3E3E3"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style TargetType="{x:Type ListViewItem}" 
               BasedOn="{StaticResource ListViewItemStyleBase}" 
               x:Key="ListViewItemStyle2">
        <Setter Property="Background" Value="AliceBlue"/>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="Background" Value="#FFFFC120"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Background" Value="#FFE3E3E3"/>
            </Trigger>
        </Style.Triggers>
    </Style>
    <src:ListViewItemStyleSelector x:Key="ListViewItemStyleSelector"/>

    <!--Vertical separator line-->
    <Style x:Key="SeparatorStyle"
           TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="1,0,0,0"/>
        <Setter Property="BorderBrush" Value="#FFC5C5C5"/>
        <Setter Property="Margin" Value="5,0,5,0"/>
        <Setter Property="Width" Value="2"/>
        <Setter Property="Background" Value="White"/>
    </Style>

</ResourceDictionary>